<%@page import="org.springframework.context.i18n.LocaleContextHolder"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>

<html>
<head>

	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/favicon.ico" />
	
	<title>:: SISTEMA DE REGISTRO ::</title>
    <link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/css/estilos.css"/>
	<link href='http://fonts.googleapis.com/css?family=Concert+One|Kite+One|Rambla:700' rel='stylesheet' type='text/css'>
	<style type="text/css">
		.titulo1{
			font-family: 'Concert One', cursive;
			text-align: center; 
			color: gray;
			font-size: 20px;			
		}
		.error{
			font-family: 'Rambla', sans-serif;
			text-align: center;
			font-weight: bold;
			font-size: 11px;
		}
		.texto1{
			font-family: 'Kite One', sans-serif;
			text-align: center;
			font-weight: bold;
			font-size: 14px;
		}
		.texto1 a, .texto1 a:hover{
			text-decoration: none;
			color: green; 
		}
		.texto2{
			font-family: 'Rambla', sans-serif;
			text-align: center;
			color: green;
			font-weight: bold;
			font-size: 16px;
		}
		.texto3{
			font-family: 'Concert One', cursive;
			text-align: right; 
			color: gray;
			font-size: 20px;			
		}
		.t_navegadoers{
			font-family: 'Rambla', sans-serif;
			text-align: center; 
			font-size: 12px;
		}
		.t_navegadoers a, .t_navegadoers a:hover{
			text-decoration: none;
			color: blue; 
		}
	</style>
   
	 <script type="text/javascript">
		 function valida() {
			 if (document.forms[0].j_username.value == "")
			   	alert("Ingrese el Usuario");
			 if (document.forms[0].j_password.value == "")
			    alert("Ingrese el Password");
			 else
			    document.forms[0].submit();
		}
		 
		function valida_usuario( event ) {
			if (!event) {
		        event = window.event;
		     }
		  if (event.keyCode == 13)
		      if (document.forms[0].j_username.value == "")
		        alert("Ingrese el Usuario");
		      else
		        document.forms[0].j_password.focus();
		}
		
		function valida_password( event ) {
			if (!event) {
		        event = window.event;
		     }
		  if (event.keyCode == 13)
		      if (document.forms[0].j_password.value == "")
		        alert("Ingrese el Password");
		      else
		        document.forms[0].submit();
		 }
	
	</script>

</head>
<body marginheight="0" style="background-color: #D2F0D1;" onload="javascript:document.forms[0].j_username.focus ();">
	
<form action="${pageContext.request.contextPath}/j_spring_security_check" method="post" onsubmit="javascript:valida();">
    
<div align="center" style="margin: 0px;  border: 0px; ">
<table id="Tabla_01" width="1024" height="641" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td background="${pageContext.request.contextPath}/images/login_04.png" width="36"></td>
		<td background="${pageContext.request.contextPath}/images/login_02.png"></td>
		<td colspan="6" background="${pageContext.request.contextPath}/images/login_03.png"></td>
		<td colspan="7" background="${pageContext.request.contextPath}/images/login_04.png" width="490" height="98"></td>
	</tr>
	<tr>
		<td colspan="15" background="${pageContext.request.contextPath}/images/login_06.png" width="1024" height="52"></td>
	</tr>
	<tr>
		<td colspan="4" rowspan="13" background="${pageContext.request.contextPath}/images/login_07.png" width="318" height="418"></td>
		<td colspan="9" background="${pageContext.request.contextPath}/images/login_08.png" width="416" height="78"></td>
		<td colspan="2" rowspan="13" background="${pageContext.request.contextPath}/images/login_09.png" width="290" height="418"></td>
	</tr>
	<tr>
		<td colspan="9" background="${pageContext.request.contextPath}/images/login_10.png" width="416" height="38">
   			<c:if test="${not empty param.login_error}">
   				<div class="errorLogin">				
					No pudo ingresar al sistema, Intentelo nuevamente.<br />
					Razon: ${sessionScope.SPRING_SECURITY_LAST_EXCEPTION.message}
				</div>				
			</c:if>
		</td>
	</tr>
	<tr>
		<td rowspan="7" background="${pageContext.request.contextPath}/images/login_11.png" width="37" height="180"></td>
		<td colspan="7" background="${pageContext.request.contextPath}/images/login_12.png" width="340" height="35">
			<div class="titulo1">INGRESA TU USUARIO Y PASSWORD</div>
		</td>
		<td rowspan="7" background="${pageContext.request.contextPath}/images/login_13.png" width="39" height="180"></td>
	</tr>
	<tr>
		<td colspan="7" background="${pageContext.request.contextPath}/images/login_14.png" width="340" height="22"></td>
	</tr>
	<tr>
		<td rowspan="5" background="${pageContext.request.contextPath}/images/login_15.png" width="31" height="123"></td>
		<td background="${pageContext.request.contextPath}/images/login_16.png" width="115" height="28">
			<div class="texto3">
				USUARIO:
			</div>
		</td>
		<td colspan="4" background="${pageContext.request.contextPath}/images/login_17.png" width="160" height="28">
                	<input type="text" name="j_username" maxlength="60" onkeypress="valida_usuario( event )"/>
</td>
		<td rowspan="3" background="${pageContext.request.contextPath}/images/login_18.png" width="34" height="61"></td>
	</tr>
	<tr>
		<td colspan="5" background="${pageContext.request.contextPath}/images/login_19.png" width="275" height="7"></td>
	</tr>
	<tr>
		<td background="${pageContext.request.contextPath}/images/login_20.png" width="115" height="26">
			<div class="texto3">
				PASSWORD:
			</div>
		</td>
		<td colspan="4" background="${pageContext.request.contextPath}/images/login_21.png" width="160" height="26">
                	<input type="password" name="j_password" onkeypress="valida_password( event )"/>
                </td>
	</tr>
	<tr>
		<td colspan="5" background="${pageContext.request.contextPath}/images/login_22.png" width="275" height="15"></td>
		<td rowspan="2" background="${pageContext.request.contextPath}/images/login_23.png" width="34" height="62"></td>
	</tr>
	<tr>
		<td colspan="5" background="${pageContext.request.contextPath}/images/login_25.png" width="275" height="47" align="center">
			<input type="submit" class="boton" value="ENTRAR">		
		</td>
	</tr>
	<tr>
		<td colspan="9" background="${pageContext.request.contextPath}/images/login_29.png" width="416" height="19"></td>
	</tr>
	<tr>
		<td colspan="9" background="${pageContext.request.contextPath}/images/login_30.png" width="416" height="28">		
			 
		</td>
	</tr>
	<tr>
		<td colspan="9" background="${pageContext.request.contextPath}/images/login_31.png" width="416" height="23">
	 
		</td>
	</tr>
	<tr>
		<td colspan="9" background="${pageContext.request.contextPath}/images/login_32.png" width="416" height="52">
			<div class="t_navegadoers">
				Se recomienda acceder al sistema utilizando las &uacute;ltimas versiones de los navegadores 
				<a href="http://windows.microsoft.com/es-ES/internet-explorer/download-ie" title="versi&oacute;n 8 o superior"  target="_blank">Internet Explorer 8+</a>,
				<a href="https://www.google.com/intl/es/chrome/browser/?hl=es" target="_blank">Google Chrome</a>,
				<a href="http://www.mozilla.org/es-ES/firefox/new/"  target="_blank">Mozilla Firefox </a>
			</div>
		</td>
	</tr>
	<tr>
		<td colspan="3" background="${pageContext.request.contextPath}/images/login_33.png" width="263" height="72"></td>
		<td colspan="11" background="${pageContext.request.contextPath}/images/login_34.png" width="549" height="72">
			<div class="texto2">
				Direcci&oacute;n: Av. Giuseppe Garibaldi (ex Gregorio Escobedo) 339 - 343 Jes&uacute;s Mar&iacute;a<br>
				Telf.: (511)461-0016 | (511)319-0700<br>
				CNL Todos los derechos reservados &reg; 2012
			</div>
		</td>
		<td background="${pageContext.request.contextPath}/images/login_35.png" width="212" height="72"></td>
	</tr>
	<tr>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="36" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="83" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="144" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="55" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="37" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="31" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="115" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="33" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="1" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="89" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="37" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="34" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="39" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="78" height="1"></td>
		<td background="${pageContext.request.contextPath}/images/espacio.gif" width="212" height="1"></td>
	</tr>
</table>
</div>
</form>

</body>
</html>